package wangxiaotao.shiro.common;

import com.aventrix.jnanoid.jnanoid.NanoIdUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.eis.SessionIdGenerator;

import java.io.Serializable;

/**
 * session id 生成
 */
public class ShiroSessionIdGenerator implements SessionIdGenerator {
    @Override
    public Serializable generateId(Session session) {
        return NanoIdUtils.randomNanoId();
    }
}
